package com.hieu.sms.persist;

import java.util.List;

import org.hibernate.Query;
import org.springframework.stereotype.Repository;

import com.hieu.sms.model.Clazz;
@Repository
public class ClazzDaoImpl extends AbstractHibernateDAOImpl<Clazz, Long> implements ClazzDao{

	
	@Override
	protected Class<Clazz> getDomainClass() {
		return Clazz.class;
	}
	
	@SuppressWarnings("unchecked")
	public List<Clazz> findByDepId(String depId){
		Query query = getSession().getNamedQuery("Clazz.findByDepId").setString("depId", depId);
		return query.list();
	}

}
